package com.kingstar.ceres.data.strategy.excel;

import com.kingstar.ceres.data.strategy.IDataListener;
import lombok.AllArgsConstructor;

import javax.annotation.Resource;
import java.util.concurrent.ThreadPoolExecutor;

public abstract class AbstractExcelChannel implements IExcelChannel {

    @Resource
    IExcelChannelManager excelChannelManager;

    @Override
    public boolean match(String type) {
        return true;
    }

    protected void register(IExcelChannel channel){
        excelChannelManager.register(channel);
    }

    @AllArgsConstructor
    protected static class InternalExecutor{
        public ThreadPoolExecutor executor;
        public IDataListener dataListener;
    }
}
